package com.example.kotlin

/**
 * @ClassName: Player
 * @Description: java类作用描述
 * @Author: chenmengjia
 * @Date: 2022/2/2 14:11
 */
class Player {
    var name = "ss"
        get() = field.capitalize()
        set(value) {
            value.trim()
        }
    var rolledValue=1
        get() = (1..6).shuffled().first()



    constructor(name: String) {
        this.name = name
    }

    constructor()
    constructor(name: String, rolledValue: Int) {
        this.name = name
        this.rolledValue = rolledValue
    }

}